﻿using System.IO;

namespace ImageCropper.Util
{
    public static class Utilities
    {
        public static bool IsFileSizeOK(Stream content, int maxSizeInMB)
        {
            long maxFileSizeBytes = (maxSizeInMB * 1024) * 1024;

            if (content.Length <= maxFileSizeBytes)
            {
                return true;
            }
            else
            {
                return false;
            }
        }
    }
}